Skip to content
This repository has been archived by the owner on May 12, 2021. It is now read-only.

(TWILL-254) Update to use ContainerId.fromString #65

Closed
wants to merge 1 commit into from

Conversation

cbaenziger
Copy link
Contributor

This moves away from the deprecated ConverterUitls.toContainerId and updates the build to use Hadoop 2.7.2 to avoid folks grabbing master and having a failure trying to run on clusters with code newer than November 18th, 2014 (release of Hadoop 2.6.0).

Copy link
Contributor

@serranom serranom left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Look good, but I have a few questions/comments. Thanks!

pom.xml Outdated
@@ -171,7 +171,7 @@
<junit.version>4.11</junit.version>
<jopt-simple.version>3.2</jopt-simple.version>
<commons-compress.version>1.5</commons-compress.version>
<hadoop.version>[2.0.2-alpha,2.3.0]</hadoop.version>
<hadoop.version>2.7.2</hadoop.version>
<hadoop20.output.dir>target/hadoop20-classes</hadoop20.output.dir>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is there any reason to keep this property at all? seems better to just have it defined in each profile as necessary.

pom.xml Outdated
<properties>
<hadoop.version>2.5.1</hadoop.version>
<hadoop.version>2.6.5</hadoop.version>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why are you eliminating the hadoop-2.5 profile?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't see any code specific to 2.5 that 2.3 did not provide?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The profile for different versions of Hadoop is both for version specific code as well as for running unit-tests. It is better to keep it and add the hadoop-2.6

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@chtyim You are asking me to leave the 2.5 profile alone and add the 2.6 profile?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, that's correct.

@@ -26,7 +26,7 @@
/**
* Wrapper class for AMRMClient for Hadoop version 2.2 or greater.
*/
public final class Hadoop22YarnAMClient extends Hadoop21YarnAMClient {
public class Hadoop22YarnAMClient extends Hadoop21YarnAMClient {

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why remove final?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If marked final, I can not extend it for Hadoop26YarnAMClient?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, okay then. sorry, I missed that.

@@ -71,6 +73,11 @@ public Hadoop20YarnAMClient(Configuration conf) {
this.nmClient = new Hadoop20YarnNMClient(YarnRPC.create(conf), conf);
}

@Override
private ContainerId containerIdLookup(String containerIdStr) {
return (ConverterUtils.toContainerId(containerIdStr));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this should be protected not private

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you

@cbaenziger
Copy link
Contributor Author

I added a few omissions and corrected the parent pom.xml from my original submission. Now the new code is actually being used and I have updated the default target to Hadoop 2.6 and removed the generic hadoop.version as suggested.

@cbaenziger
Copy link
Contributor Author

Thank you for the super fast code review @serranom! I think all comments have been addressed and the code should be complete now. Please let me know if you see anything else necessary. It is great working with Twill! Hopefully I can provide some other ideas as I work with it.

Copy link
Contributor

@serranom serranom left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good to me, but I'll wait a bit to hear if there are objections from others.

@chtyim
Copy link
Member

chtyim commented Feb 5, 2018

The change looks mostly ok to me, except for the change in the pom.xml profile.

@cbaenziger
Copy link
Contributor Author

Hi @chtyim, thank you for the review. Could you please expand on what you see concerning in the pom.xml? For reference, I need to provide a 2.6 target as it is the first version to provide the ContainerId.fromString() API.

@chtyim
Copy link
Member

chtyim commented Feb 6, 2018

Changes LGTM.

@asfgit asfgit closed this in d6095d4 Feb 6, 2018
asfgit pushed a commit that referenced this pull request Mar 16, 2018
This closes #65 on Github.

Signed-off-by: Terence Yim <chtyim@apache.org>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
3 participants